package com.user.mock.handler;

import com.entity.user.ClientType;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedJdbcTypes;
import org.apache.ibatis.type.MappedTypes;
import org.apache.ibatis.type.TypeHandler;

import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

@MappedJdbcTypes(JdbcType.INTEGER)
@MappedTypes(ClientType.class)
public class ClientTypeHandler implements TypeHandler<ClientType> {
    @Override
    public void setParameter(PreparedStatement ps, int i, ClientType parameter, JdbcType jdbcType) throws SQLException {
        ps.setInt(i,parameter.getIndex());
    }

    @Override
    public ClientType getResult(ResultSet rs, String columnName) throws SQLException {
        return null;
    }

    @Override
    public ClientType getResult(ResultSet rs, int columnIndex) throws SQLException {
        return null;
    }

    @Override
    public ClientType getResult(CallableStatement cs, int columnIndex) throws SQLException {
        return null;
    }
}
